import request from "@/util/http";
// tiezi.js
export const PostTiezi = (data) => {
  return request({
    url: "teizi/PostTiezi",
    method: "post",
    headers: {
      'Content-Type': 'application/json'
    },
    data,
  });
};


export const GetTieziList = (page) => {
  return request({
    url: `teizi/getTieziList/${page}`,
    method: "get",
  });
};
export const GetTieziReplys = (id,page) => {
  return request({
    url: `teizi/getTieziReplys/${id}/${page}`,
    method: "get",
  });
};
export const GetTieziDetail = (postId) => {
  return request({
    url: `teizi/getTieziDetail/${postId}`,
    method: "get",
  });
};
export const GetUserPosts = (userId) => {
  return request({
    url: `teizi/getUserPosts/${userId}`,
    method: "get",
  });
};


export const PostTeiziReply = (data) => {
  return request({
    url: "teizi/postTeiziReply",
    method: "post",
    headers: {
      'Content-Type': 'application/json'
    },
    data,
  });
};
export const PostLike = (data) => {
  return request({
    url: "teizi/like",
    method: "post",
    headers: {
      'Content-Type': 'application/json'
    },
    data,
  });
};



